package com.zzxx.controller;

import com.github.pagehelper.PageInfo;
import com.zzxx.pojo.Role;
import com.zzxx.pojo.SysLog;
import com.zzxx.service.SyslogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/syslogController")
public class SyslogController {
    @Autowired
    private SyslogService service;
    @RequestMapping("/getSyslog")
    @ResponseBody
    public PageInfo<SysLog> getSyslog(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "2") Integer pageSize){
        PageInfo<SysLog> pageInfo = service.getAllSyslog(pageNum,pageSize);
        return pageInfo;
    }
}
